package com.oneandseven.dajia.base.entity;

import lombok.Data;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;

@Data
@MappedSuperclass
public class BaseEntity {

    private static final String CUSTOM_ID = "custom-id";
    private static final String COM_YSS_AMS_FAST_IMPL_GENERATOR_CUSTOM_ID_GENERATOR = "com.oneandseven.dajia.base.generator.CustomIDGenerator";


    @Id
    @GeneratedValue(generator = CUSTOM_ID)
    @GenericGenerator(name = CUSTOM_ID, strategy = COM_YSS_AMS_FAST_IMPL_GENERATOR_CUSTOM_ID_GENERATOR)
    private String id;


}
